/**
 * Description:
 * Class Name:InvokeRun
 * Date:2022/5/5 12:29
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第16章_多线程._16_3_线程的生命周期._16_3_1_新建和就绪状态;

public class InvokeRun extends Thread{
    private int i;

    @Override
    public void run() {
        for (;i < 100; i++){
            System.out.println(Thread.currentThread().getName() + "_" + i);
        }
    }

    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + "_" + i);
            if (i == 20){
                new InvokeRun().run();
                new InvokeRun().run();
            }
        }
    }
}
